#!/bin/bash


pwd=`pwd`
cwd=`dirname $1`;
edit_file=`basename $1 .dia`;
file=`basename $1`;

cd $cwd
gunzip --verbose -S .dia $file
vim -c ':set syntax=xml' $edit_file
gzip -N -9 -S .dia $edit_file
cd $pwd
